<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = prompt('今天是号？')
         if ( a % 7 == 1 && a >= 1 && a <= 31) {
            alert('今天星期三')
        }else if(a % 7 == 2 && a >= 1 && a <= 31) {
            alert('今天星期四')
        }
        else if (a % 7 == 3 && a >= 1 && a <= 31) {
            alert('今天星期五')
        }else if (a % 7 == 4 && a >= 1 && a <= 31) {
            alert('今天星期六')
        }else if (a % 7 == 5 && a >= 1 && a <= 31) {
            alert('今天星期天')
        }else if (a % 7 == 6 && a >= 1 && a <= 31) {
            alert('今天星期一')
        }else (
            alert('请输入正确的日期')
        )
    </script>
</body>
</html>